package cn.tedu.oa_system.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Author MW
 * @Description 角色实体类
 * @CreateDate 2023/3/5
 */
@Data
@TableName(value = "role")
public class Role implements Serializable {

    static final long serialVersionUID = 1L;

    @TableId
    private Long roleId;

    private String roleName;

    private Integer roleValue;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Role role = (Role) o;
        return Objects.equals(roleId, role.roleId) && Objects.equals(roleName, role.roleName) && Objects.equals(roleValue, role.roleValue);
    }

    @Override
    public int hashCode() {
        return Objects.hash(roleId, roleName, roleValue);
    }

    @Override
    public String toString() {
        return "Role{" +
                "roleId=" + roleId +
                ", roleName='" + roleName + '\'' +
                ", roleValue=" + roleValue +
                '}';
    }
}
